<?php

namespace App\Models\Data;


use Illuminate\Database\Eloquent\Model;
use Dcat\Admin\Traits\HasDateTimeFormatter;
use Illuminate\Database\Eloquent\Relations;

class ClickLearnSpell extends Model
{
    use HasDateTimeFormatter;
    protected $table = 'click_learn_spells';
    protected $fillable = ['id','name','time','color','click_learn_id','is_option','end_time'];


    const OPTION_TRUE=1;
    const OPTION_OFF=0;
    public static array $optionMap = [
        self::OPTION_OFF=>'题干',
        self::OPTION_TRUE=>'选项',
    ];
    public function click_learn(): Relations\BelongsTo
    {
        return $this->belongsTo(ClickLearn::class);
    }

}
